/*
 * Filename CorePayClinet.java 2022年03月17日
 * Copyright © Ehome Co.Ltd. All Rgiths Reserved.
 * @author wuyingchao
 */
package com.ehome.poct.core.service.rpc;

import com.ehome.paymentcenter.api.pay.BaseQueryReqCO;
import com.ehome.paymentcenter.api.pay.prepay.CashierPayQueryRspCO;
import com.ehome.paymentcenter.api.pay.qrcode.QrCodeReqCO;
import com.ehome.paymentcenter.api.pay.scan.ScanPayReqCO;
import com.ehome.web.entity.ResponseWrapper;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author wyc
 * @since 2022/03/17 16:49
 **/
@FeignClient(
        value = "${service.payment-center:}${service.suffix.payment-center:}",
        url = "${service.payment-center.url:}",
        path = "/pay",
        contextId = "core-pay"
)
public interface CorePayClient {
    @PostMapping({"/qrCode"})
    String qrCode(@RequestBody QrCodeReqCO basePayReqCO);

    @PostMapping({"/qrCodeQuery"})
    String qrCodeQuery(@RequestBody BaseQueryReqCO basePayReqCO);

    @PostMapping("/scan")
    String scan(ScanPayReqCO basePayReqCO);

    @PostMapping("/query")
    ResponseWrapper<CashierPayQueryRspCO> query(BaseQueryReqCO queryReqCO);
}